package tedu.study.ooday05_2;

public class EnumDemo {
    public static void main(String[] args) {
        Season s = Season.WINTER;
        //s.setSeasonName("洞天");
        System.out.println(s.name());
        System.out.println(s.getSeasonName());
        System.out.println(s.getSeasonDesc());
        switch (s){
            case SPRING:
                System.out.println(s.getSeasonName()+"春暖花开");
                break;
            case SUMMER:
                System.out.println(s.getSeasonName()+"上山避暑");
                break;
            case AUTUMN:
                System.out.println(s.getSeasonName()+"清扫落叶");
                break;
            case WINTER:
                System.out.println(s.getSeasonName()+"开始游泳");
                break;
        }

        Season[] seasons = Season.values();
        for(int i=0;i<seasons.length;i++){
            System.out.println(seasons[i].name()+", "+seasons[i].getSeasonName());
        }
    }
}
